<{$xoTheme->addStylesheet("modules/`$xoops_dirname`/templates/style.css")}>
<div id="support_index_crumb" class="breadcrumbs">
    <{foreach item=itm from=$xoBreadcrumbs name=bcloop}>
       
        <{if $itm.link}>
            <a href="<{$itm.link}>" title="<{$itm.title}>"><{$itm.title}></a>
        <{else}>
            <{$itm.title}>
        <{/if}>
        <{if !$smarty.foreach.bcloop.last}>
            &raquo;
        <{/if}>
    <{/foreach}>
</div>

<div>
    <form name="<{$form.name}>" id="<{$form.name}>" action="<{$form.action}>" method="<{$form.method}>" <{$form.extra}>>
        <table class="outer" width="100%">
                <tr class="head">
                    <th colspan="2"><{$form.title}></th>
                </tr>
                <{foreachq item=item from=$form.elements}>
                <{if !$item.hidden}>
                <tr>
                <td class="even" width="10%"><{$item.caption}><{if $item.required}><em>*</em><{/if}></td>
                <td class="odd"><{$item.body}></td>
                </tr>
                <{else}>
                    <{$item.body}>
                <{/if}>
            <{/foreach}>
        </table>
    </form>
</div>
<{$form.javascript}>

<script src="<{$xoops_url}>/modules/support/include/jquery.js" type="text/javascript"></script>

<{if $op eq 'reply' ||  $op eq 'add'  ||  $op eq 'reject' }>
<script>
$(document).ready(function(){
	var fileName = $("input[name='annex']").attr("name");
    var i = 0;
	  $("#addMore").click(function(){
        i = ++i;
    	$(this).parent().before('<div><input type="file" name="'+fileName+i+'" id="'+fileName+i+'" /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="'+fileName+i+'" /> <a id="del'+i+'" href="javascript:void(0);" onclick="deleteUploadfeild('+i+');">X</a></div>');
    });
});
function deleteUploadfeild(id){
    var id = '#del'+id;
    $(id).parent().remove();
};
</script>
<{elseif $op eq 'forword'}>
<script>
$(document).ready(function(){
	var fileName = $("input[name='annex']").attr("name");
    var i = 0;
	  $("#addMore").click(function(){
        i = ++i;
    	$(this).parent().before('<div><input type="file" name="'+fileName+i+'" id="'+fileName+i+'" /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="'+fileName+i+'" /> <a id="del'+i+'" href="javascript:void(0);" onclick="deleteUploadfeild('+i+');">X</a></div>');
    });
});
function deleteUploadfeild(id){
    var id = '#del'+id;
    $(id).parent().remove();
};
</script>
<SCRIPT language=JavaScript>
$(document).ready(function() {
    $("select[id=cat_id]").change( function() {
        var cat_id = $(this).val();
        $.ajax({
            type: "get",
            url: "ajax.php",
            data:   "op=forword&cat_id=" + cat_id,
            success: function(msg){        
              	$("#forword").html(msg);
            } 
        });
    });      
}); 
</script>
<{else}>
<{/if}>
